/**
 * 
 */
package com.sci.web.action.datareportseason.datacheck;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import com.sci.web.action.util.BaseAction;
import com.sci.web.dao.DataCheckDao;
import com.sci.web.dao.SystemManageDao;

/**
 * @author  BaiFuyou
 * @date: Nov 13, 2011 10:05:26 AM
 * 
 * 企业数据审核通过
 */
public class EnterpriseCheckPassAction extends BaseAction {
	@Resource
	private SystemManageDao systemManageDao;
	@Resource
	private DataCheckDao dataCheckDao;
	private int eid;
	private String year;
	private int type;
	/**
	 * @return the eid
	 */
	public int getEid() {
		return eid;
	}
	/**
	 * @param eid the eid to set
	 */
	public void setEid(int eid) {
		this.eid = eid;
	}
	/**
	 * @return the year
	 */
	public String getYear() {
		return year;
	}
	/**
	 * @param year the year to set
	 */
	public void setYear(String year) {
		this.year = year;
	}
	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}
	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}
	
	@Override
	public String execute() throws Exception {
		// TODO Auto-generated method stub
		super.setContentType(super.JSON);
		/**
		 * 存储企业修改处理方式
		 */
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("eid", eid);map.put("state", 2);
		/**
		 * 存储各个不同选项处理方式
		 */
		Map<String, Object> map1 = new HashMap<String, Object>();
		map1.put("type", type);
		map1.put("year", year);
		map1.put("result", 1);
		map1.put("where_check_pass", 0);
		map1.put("eid", eid);
		dataCheckDao.DataCheckPass(map, map1);
		if(dataCheckDao.isTrueDataCheckPass(map1)){
			super.outPrint("ok");
		}else{
			super.outPrint("fail");
		}
		return "json";
	}
}
